﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TSNPro.MyControl;

namespace TSNPro.Communication.Sender
{
    public class BaseSender:BaseCommunication
    {
        public event EventHandler<byte[]> DataReceived;

        public virtual bool Send(byte[] arr)
        {
            return true;
        }

        public override Control GetConfigWidget()
        {
            SerialPortControl serialPortControl = new SerialPortControl();
            return serialPortControl;
        }

        protected void DataReceivedWrap(byte[] arr)
        {
            DataReceived?.Invoke(this,arr);
        }
    }
}
